package com.lkj.customer;

import com.lkj.netty.NettyClient;
import com.lkj.publicinsterface.HelloService;

public class ClientBootstrap {

    public static final String providerName = "HelloService#hello#";

    public static void main(String[] args) throws Exception {

        NettyClient customer = new NettyClient();
        HelloService service = (HelloService) customer.getBean(HelloService.class,providerName);

        for (;;) {

            Thread.sleep(2 * 1000);
            //通过代理对象调用服务提供者的方法(服务)
            String res = service.hello("你好 dubbo~");
            System.out.println("调用的结果 res= " + res);
        }
    }
}
